<?php

require 'includes/db.php';
if (isset($_POST['submit'])) {

	$name = $_POST['name'];

	$phone = $_POST['phone'];
	$email = $_POST['email'];
	$message = $_POST['message'];

	$abc = mysql_query("INSERT INTO contact_us(name, phone, email, message) VALUES ('$name', '$phone', '$email', '$message')") or die(mysql_error());
	#http://php.net/manual/en/function.mail.php
	// multiple recipients
	$to = 'arshad.cyberlinks@gmail.com';

	$subject = 'Cyberlinks.in';

	// message
	$message = "<table width=\"70%\" align=\"center\" style=\"color:red;background:pink;padding:20px;border:1px solid blue;\">
				<th colspan=\"2\" align=\"center\">Contect Detail,</th>
				<tr>
					<td>Name:-</td>
					<td>$name</td>
				</tr>
				<tr>
					<td>Phone</td>
					<td>$phone</td>
				</tr>
				<tr>
					<td>Email</td>
					<td>$email</td>
				</tr>
				<tr>
					<td>Messege</td>
					<td>$message</td>
				</tr>
				<tr>
					<td>Mail from cyberlinks.in contect us</td>
					<td><a href=\"cyberlinks.in/admin\">Cyberlinks Admin Panel</a></td>
				</tr>
			</table>";

	// To send HTML mail, the Content-type header must be set
	$headers = 'MIME-Version: 1.0' . "\r\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

	// Additional headers
	//$headers .= 'To: Shekher <shekher.cyberlinks@gmail.com>' . "\r\n";
	$headers .= 'From: Cyberlinks <admin@cyberlinks.in>' . "\r\n";
	$headers .= 'Cc: arshad.cyberlinks@gmail.com' . "\r\n";
	//$headers .= 'Bcc: vikas@gmail.com' . "\r\n";

	$flag = mail($to, $subject, $message, $headers);
	$flag = mail($email, $subject, 'Thank you for your interest in Cyberlinks Technology. We appreciate the opportunity to interact with you. 
Please feel free to write at admin@cyberlinks.in or use the form below.');
	header('location:contact_us.php?msg=We Will Contect You');
}

require 'header.php';
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->
<head>
<script type="text/javascript" src="admin/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="admin/js/register.jquery.js"></script>
</head>
<div class="clear"></div>
</section>
</div>
<div class="clear"></div>
</header>
<div id="bg-image" style="background-image:url(images/contact.jpg);">
<div id="pagetitle-wrap" style="background-color:#ffaa1c;">
<h1 class="pagetitle">Contact Us</h1>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<!-- END HEADER -->

<!-- MAIN CONTENT -->

<div id="outermain">
<div class="container">
<div class="row">
<section id="maincontent" class="nine columns positionleft">
<section class="content">

<div class="addressinfo left">
<h3 class="color_yellow">ADDRESS INFO</h3>

<p><strong>Gurgaon Office</strong><br />
	IDC - 31 B, Second Floor, M.G. Road, Gurgaon<br />
	Telephone: 0124-427-4977<br />
	FAX: +1 0123-4567-8900<br />
	E-mail: sales@cyberlinks.in <br />
	Website: www.cyberlinks.in <br /><br />

	<strong>Business Hours</strong><br />
	Monday - Friday 10am to 7pm<br />
	Saturday & Sunday - Closed
</p>

<p><strong>US Office</strong><br />
	5201, Great America Pkwy, Suite 120<br>

	Santa Clara, CA 95054<br />
		Telephone: (+1)-315-332-1191<br />
FAX: +1 0123-4567-8900<br />
E-mail: sales@cyberlinks.in <br />
Website: www.cyberlinks.in <br /><br />

<strong>Business Hours</strong><br />
Monday - Friday 10am to 7pm<br />
Saturday & Sunday - Closed
</p>

</div>

<div class="contactform left">
<h3 class="color_yellow">CONTACT FORM</h3>

<form id="registerId" action="#" method="post">
<label>Your Name*</label><br />
<input type="text" placeholder="Type your name" name="name" value=""/><br /><br />

<label>Phone*</label><br />
<input type="text" name="phone" placeholder="Type phone number " value=""/><br /><br />

<label>Email*</label><br />
<input type="text" name="email" placeholder="Type your email" value=""/><br /><br />

<label>Your Message*</label><br />
<textarea name="message" rows="8" placeholder="Type your message"></textarea><br /><br />

<input type="submit" name="submit" value="Submit"/><br />

</form>

</div>

<div class="clear"></div>
<div  class="map left">
<h3 class="color_yellow">FIND THE ADDRESS</h3>
<iframe class="mapsetting" width="1130" height="250" src="https://maps.google.co.in/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=IDC,+Industrial+Development+Area,+Sector+16,+Gurgaon,+Haryana&amp;aq=0&amp;oq=idc+,+Gurgaon&amp;sll=28.470121,77.05292&amp;sspn=0.011469,0.021136&amp;ie=UTF8&amp;hq=&amp;hnear=IDC&amp;t=m&amp;z=14&amp;ll=28.470121,77.05292&amp;output=embed"></iframe><br /><small><a href="https://maps.google.co.in/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=IDC,+Industrial+Development+Area,+Sector+16,+Gurgaon,+Haryana&amp;aq=0&amp;oq=idc+,+Gurgaon&amp;sll=28.470121,77.05292&amp;sspn=0.011469,0.021136&amp;ie=UTF8&amp;hq=&amp;hnear=IDC&amp;t=m&amp;z=14&amp;ll=28.470121,77.05292" target="_blank">View Larger Map <img src="images/greater_than.png" width="9" height="13" alt=""/></a></small>
</div>

</section>
</section>

</div>
</div>
</div>
<!-- END MAIN CONTENT -->

<!-- BOTTOM -->
<div id="outerbottom">
<div id="bottomcontainer">
<div class="container">
<div class="row">
<div class="bottom-container twelve columns">
<div id="main-ticker">
<!--<ul id="ticker">
<li><a href='#'>Japanese Economy Signaling a Slowdown</a></li>
<li><a href='#'>A Mutual Fund Master, Too Worried to Rest</a></li>
<li><a href='#'>Americans feeling better about economic</a></li>
<li><a href='#'>Economic Reports for the Week Ahead</a></li>
<li><a href='#'>Treasury Auctions Set for This Week</a></li>
</ul>-->
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
</div>
<!-- END BOTTOM-->

<!-- FOOTER -->
<footer id="footer">

<?php
	require 'footer.php';
?>
</footer>
<!-- END FOOTER -->
<div class="clear"></div>
<!-- clear float -->
</div>
<!-- end outercontainer -->
</div>
<!-- end bodychild -->

<!-- ////////////////////////////////// -->
<!-- //      Javascript Files        // -->
<!-- ////////////////////////////////// -->
<!--<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script> -->

<!-- jQuery Superfish -->
<script type="text/javascript" src="js/hoverIntent.js"></script>
<script type="text/javascript" src="js/superfish.js"></script>
<script type="text/javascript" src="js/supersubs.js"></script>

<!-- jQuery Dropdown Mobile -->
<script type="text/javascript" src="js/tinynav.min.js"></script>

<!-- Custom Script -->
<script type="text/javascript" src="js/custom.js"></script>

<!-- jQuery Flex Slider -->
<script type="text/javascript" src="js/jquery.flexslider-min.js"></script>
<script type="text/javascript">
	jQuery(window).load(function() {
		jQuery('#postgallery').flexslider({
			animation : "fade",
			touch : true,
			animationDuration : 6000,
			directionNav : true,
			controlNav : false
		});

		jQuery('#galleryitems').flexslider({
			animation : "fade",
			touch : true,
			animationDuration : 6000,
			directionNav : false,
			controlNav : true
		});

	}); 
</script>

<!-- jQuery PrettyPhoto -->
<script type="text/javascript" src="js/jquery.prettyPhoto.js"></script>

<!-- jQuery News Flash -->
<script type="text/javascript" src="js/jquery.carouFredSel.js"></script>
</body>
</html>
